package graficos;

import agentes.AgenteExtractor;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * VentanaExtractor.java
 *
 * Created on 19/11/2009, 10:38:58 AM
 */

/**
 *
 *  @author hayner Benavides Moreno y Jorge Hernan Londoño Echeverri
 */
public class VentanaExtractor extends javax.swing.JFrame {

    private AgenteExtractor agente;
    /** Creates new form VentanaExtractor */
    public VentanaExtractor(AgenteExtractor agente) {
        this();
        this.agente = agente;
        this.setTitle("Agente extractor "+agente.getName());
    }

    public VentanaExtractor(){
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        listaAcciones = new javax.swing.JTextArea();

        setTitle("Agente extractor");

        jLabel1.setText("Acciones realizadas por el agente extractor");

        listaAcciones.setColumns(20);
        listaAcciones.setRows(5);
        listaAcciones.setEnabled(false);
        jScrollPane1.setViewportView(listaAcciones);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(91, 91, 91)
                        .addComponent(jLabel1))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 253, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */

     public void adicionarSuceso(String suceso){
        this.listaAcciones.setText(this.listaAcciones.getText() +" \r\n"+suceso);
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextArea listaAcciones;
    // End of variables declaration//GEN-END:variables

}
